Skip to main content

Simulate Escrow Release

Simulates the release of funds from an escrow.

query Router($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {
router {
simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {
release_amounts {
amount
cross_chain_user {
user {
chain_uid
address
}
limit
}
}
remaining_amount
}
}
}

Example

curl --request POST \
--header 'content-type: application/json' \
--url 'https://testnet.api.euclidprotocol.com/graphql' \
--data '{"query":"query Router($token: String!, $amount: Int, $crossChainAddresses: [CrossChainUserWithLimitInput]) {\n router {\n simulate_release_escrow(token: $token, amount: $amount, cross_chain_addresses: $crossChainAddresses) {\n release_amounts {\n amount\n cross_chain_user {\n user {\n chain_uid\n address\n }\n limit\n }\n }\n remaining_amount\n }\n }\n}","variables":{"token":"euclid","amount":100000000000,"crossChainAddresses":[{"limit":null,"user":{"address":"0x6287a53c957F13BE3b79Ffc637A19fc2504C4D16","chain_uid":"monad"}}]}}'

Open in Playground

Arguments

NameTypeDescription
tokenString!Token ID to simulate escrow release for.
amountIntTotal amount to release from escrow.
cross_chain_addresses[CrossChainUserWithLimitInput]Optional destination users and limits for release simulation.

Return Fields

FieldTypeDescription
remaining_amountStringAmount left after applying release simulation.
release_amounts[ReleaseAmounts]Per-destination simulated release amounts.

ReleaseAmounts

FieldTypeDescription
amountStringSimulated amount to release to this destination.
cross_chain_userCrossChainUserWithLimitDestination user and limit details.

CrossChainUserWithLimit

FieldTypeDescription
userCrossChainUserDestination chain/address.
limitStringOptional limit used by the simulation.